import java.lang.*;
import java.util.*;
	
public class CalculatorAll {

public static int[] printEven(int from,int to) {
int len = ((to-from)/2)+1;
int[] even = new int[len];
int index=0;
for(int i=from; i<to; i++)
{
if(i % 2 == 0) 
{
even[index] = i;
index++;
}
}
return even;
}

public static int[] printOdd(int from,int to)
{
int len = ((to-from)/2)+1;
int index=0;
int[] Odd = new int[len];
for(int i=from;i<to;i++)
{
if(i % 2 != 0)
{
Odd[index]=i;
index++;
}
}
return Odd;
}
public static int[] Fibo(int num) {

int fib[] = new int[num];
fib[0]=0;
fib[1]=1;
for(int i=2;i<fib.length;i++)
{
	fib[i] = fib[i-1] + fib[i-2];
}
return fib;
}


public static char[] reverseArr(char[] ab)
{
char[] rev = new char[ab.length];
int i,j;
for(i=0,j=ab.length-1;j>=0;i++,j--)
{
rev[j] = ab[i];
}
return rev;
}


public static int[] isPrime(int[] p)
{
int index=0;
int[] prime = new int[p.length];
for(int i=0;i<p.length;i++)
{
if((p[i] % 2 != 0) || (p[i] % 2 == 1))
prime[i] = p[i];

}
return prime;
}

public static void printArray(int[] array) {
	for(int i=0; i<array.length; i++)
		System.out.println(array[i]);
}

public static void printArr(char[] array) {
	for(int i=0;i<array.length;i++)
		System.out.println(array[i]);

}


public static void sumArray(int num) {
int [] sum = new int[num];
int Sum1 = 0;
for(int i=0; i<num; i++)
{
sum[i] = (int) (Math.random() * 1000);
System.out.println(" " + sum[i]);
}
for(int i=0; i<sum.length;i++)
{
Sum1 = Sum1 + sum[i];
}
System.out.println("Sum of Array values = " + Sum1);
}


public static int maxArray(int[] a)
{
int max = a[0];
	for(int i=1;i<a.length;i++)
	{
		if(max < a[i]) {
		int temp = max;
		max = a[i];
		a[i]=temp;
	}
	}
	return max;
}

public static void printint(int a)
{
System.out.println( " " + a);
}


public static int countVowel(char[] ex)
{
char[] vowel = {'a','A','E','e','I','i','O','o','U','u'};
int i,j,count=0;
for(i=0;i<ex.length;i++)
{
for(j=0;j<vowel.length;j++) {
if(ex[i] == vowel[j])
count++;
}
}
return count;
}


public static int[] GenerateArray(int size) {

int[] rand = new int[size];
for(int i=0;i<rand.length;i++)
{
rand[i]= (int) (Math.random() * 100);
}

return rand;
}
public static char[] GenerateCharArray(int size) {

char[] charArr = new char[size];
for(int i=0;i<charArr.length;i++)
{
charArr[i]= (char) (Math.random() * 100);

}
return charArr;
}

public static int[] revIntArray(int[] n1) {
int[] res = new int[n1.length];

for(int i=0,j=res.length-1; i<n1.length;i++,j--)
{

res[j]=n1[i];

}
return res;
}
}

